#ifndef __date_H
#define __date_H

typedef struct {
	unsigned int count;
	unsigned short year;
	unsigned char month;
	unsigned char day;
} date;

int set_date(date *date, unsigned short year, unsigned char month, unsigned char day);
int update_date(date *date, int offset);

#define get_year(d)				((d).year)
#define get_month(d)			((d).month)
#define get_day(d)				((d).day)
#define get_week(d)				((d).count%7)	

#endif